﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace SmartPlant.Model.DbContext
{
    public class UnitOfMeasure
    {
        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_ID", IsPrimaryKey = true)]
        public decimal UomId { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "PROJ_ID")]
        public decimal ProjId { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "SITE_ID")]
        public decimal SiteId { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "CHG_NUM")]
        public decimal ChgNum { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "USER_NAME")]
        public string UserName { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "CHG_STATUS")]
        public string ChgStatus { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "CHG_DATE")]
        public DateTime? ChgDate { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_CODE")]
        public string UomCode { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_NAME")]
        public string UomName { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_TYPE")]
        public string UomType { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_DESC")]
        public string UomDesc { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "ISO31_ITEM")]
        public string Iso31Item { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_KIND")]
        public string UomKind { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "CONVERT_TO_UOM_ID")]
        public decimal? ConvertToUomId { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_FACTOR")]
        public decimal? UomFactor { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_LIQUID_FLG")]
        public string UomLiquidFlg { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "ORIG_UOM_CODE")]
        public string OrigUomCode { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "PREV_UOM_CODE")]
        public string PrevUomCode { get; set; }

        /// <summary>
        ///
        ///</summary>
        [SugarColumn(ColumnName = "UOM_ENABLE_FLG")]
        public string UomEnableFlg { get; set; }

        #region 1

        /// <summary>
        /// 对应<see cref="UnitOfMeasure.UomType"/>的uomType实体，靠<see cref="UnitOfMeasureType.TypeName"/>去对应
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public UnitOfMeasureType UoMTypeEntity { get; set; }

        /// <summary>
        /// <see cref="UnitOfMeasureType.UomTypeId"/>
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public decimal UoM_TYPE_ID { get; set; }

        #endregion 1
    }
}
